<div class="row">
     <div class="col-xs-12 col-xs-12">
          <div class="widget radius-bordered">
              <div class="widget-header bg-blue">
				<i class="widget-icon fa fa-arrow-down"></i>
				<span class="widget-caption">自定义菜单设置</span>
				<div class="widget-buttons">
					<a href="#" data-toggle="maximize">
						<i class="fa fa-expand"></i>
					</a>
					<a href="#" data-toggle="collapse">
						<i class="fa fa-minus"></i>
					</a>
					<a href="#" data-toggle="dispose">
						<i class="fa fa-times"></i>
					</a>
				</div>
			</div>
              <div class="widget-body">
                   <form id="JoelForm" action="" method="post" class="form-horizontal"
                                                  data-bv-message=""
                                                  data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
                                                  data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
                                                  data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
                  <input type="hidden" name="id" value="{$cache.id}">
                  <div class="form-title">
                        <a href="{:U('Cms/Diymenu/cate/')}" class="btn btn-primary" data-loader="Joel-loader" data-loadername="门店自定义菜单">
						<i class="fa fa-mail-reply"></i>返回
						</a>
                   </div>
                   <empty name="cache.id">
                   <div class="form-group">
                        <label class="col-lg-2 control-label">选择父菜单</label>
                        <div class="col-lg-4">
                             <select class="form-control" name="pid" >
                                  <option value="0">顶级菜单</option>
                                  <volist name="cate" id="vo">
                                  	<option value="{$vo.id}" <eq name="vo.id" value="$cache.pid">selected</eq>>{$vo.name}</option>
                                  		<volist name="vo['_child']" id="vo2">
											<option value="{$vo2.id}" <eq name="vo2.id" value="$cache.pid">selected</eq>>&nbsp;&nbsp;└{$vo2.name}</option>
												<foreach name="vo2['_child']" item="vo3">
													<option value="{$vo3.id}" <eq name="vo3.id" value="$cache.pid">selected</eq>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└{$vo3.name}</option>
													<foreach name="vo3['_child']" item="vo4">
														<option value="{$vo4.id}" <eq name="vo4.id" value="$cache.pid">selected</eq>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└{$vo4.name}</option>
														<foreach name="vo4['_child']" item="vo5">
															<option value="{$vo5.id}" <eq name="vo5.id" value="$cache.pid">selected</eq>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└{$vo5.name}</option>														
														</foreach>
													</foreach>
												</foreach>
										</volist>
                                  </volist>
                             </select>

                        </div>
                   </div>
                   </empty>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">自定义菜单名称<sup>*</sup></label>
                        <div class="col-lg-4">
                        <input type="text" class="form-control" name="name" placeholder="必填"
                                                               data-bv-notempty="true"
                                                               data-bv-notempty-message="不能为空" value="{$cache.name}">
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">自定义菜单类型<sup>*</sup></label>
                        <div class="col-lg-4">
                        		<select name="type">
                        			<option value="view" <eq name="cache.type" value="view">selected</eq>>网址［VIEW］</option>
                        			<option value="click" <eq name="cache.type" value="click">selected</eq>>关键词［CLICK］</option>
                        		</select>
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">网址</label>
                        <div class="col-lg-4">
                        <input type="text" class="form-control" name="url" placeholder="类型为网址时必须填写！" value="{$cache.url}">
                        </div>
                   </div>
				  <div class="form-group">
                        <label class="col-lg-2 control-label">关键词</label>
                        <div class="col-lg-4">
                        <input type="text" class="form-control" name="keyword" placeholder="类型为关键词时必须填写！" value="{$cache.keyword}">
                        </div>
                        ＝》关键词必须是已有的“魔法关键词”
                   </div>
						<div class="form-group">
                             <div class="col-lg-offset-2 col-lg-4">
                             <button class="btn btn-primary btn-lg" type="submit">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;
                             <button class="btn btn-palegreen btn-lg" type="reset">重填</button>
                        </div>
                    </div>
                   </form>
                </div>
        </div>
	</div>
     
</div>
<!--面包屑导航封装-->
<div id="tmpbread" style="display: none;">{$breadhtml}</div>
<script type="text/javascript">
	setBread($('#tmpbread').html());
</script>
<!--/面包屑导航封装-->
<!--表单验证与提交封装-->
<script type="text/javascript">
	$('#JoelForm').bootstrapValidator({
		submitHandler: function (validator, form, submitButton) {
           var tourl="{:U('Cms/Diymenu/cateSet')}";
			var data=$('#JoelForm').serialize();
			$.Joel.ajax('post',tourl,data,null);
			return false;
        },
	});
</script>
<!--/表单验证与提交封装-->